﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Castle.ActiveRecord;

namespace ZDSoft.LMS.Domain
{
    [ActiveRecord]
    public class Station:EntityBase
    {
        /// <summary>
        /// 站名
        /// </summary>
        [Property]
        public string Name { get; set; }

        /// <summary>
        /// 所属省
        /// </summary>
        [BelongsTo("ProvinceID")]
        public Province Province { get; set; }

        /// <summary>
        /// 订单
        /// </summary>
        [HasMany(typeof(TransportOrder),ColumnKey="StartStationID",Inverse=true)]
        public IList<TransportOrder> SendTransportOrders { get; set; }

        [HasMany(typeof(TransportOrder), ColumnKey = "DestionationStationID", Inverse = true)]
        public IList<TransportOrder> ReceiveTransportOrders { get; set; }
    }
}
